<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    <div class="container-div">
    <div class="row">
    	<div class="col-sm-12 search-collapse">
			<form id="modInfo-form">
				<div class="select-list">
					<ul>
						<li>
							模板名称：<input type="text" name="modNm"/>
						</li>
						<li>
							<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
						    <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
						</li>
					</ul>
				</div>
			</form>
		</div>
		<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
			<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="evo:modInfo:add">
				<i class="fa fa-plus"></i> 添加
			</a>
			<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="evo:modInfo:edit">
	            <i class="fa fa-edit"></i> 修改
	        </a>
			<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="evo:modInfo:remove">
				<i class="fa fa-remove"></i> 删除
			</a>
		</div>
			
		<div class="col-sm-12 select-table table-striped">
			<table id="bootstrap-table" data-mobile-responsive="true"></table>
		</div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "evo/modInfo";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                modalName: "电子凭证模板",
                uniqueId:"modId",
                search:false,
                showSearch:false,
                showColumns:false,
                showToggle:false,
                showExport:false,
                showRefresh:false,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'modId', 
					title : '主键' ,
					visible: false 
				},
				{
					field : 'modNm', 
					title : '模板名称' 
				},
				{
					field : 'modFilepath', 
					title : '全路径名' 
				},
				{
					field : 'modBgFilepath', 
					title : '底板全路径名' 
				},
				{
					field : 'modNote', 
					title : '备注' 
				}]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>